home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.1 / Amiga Developer CD v1.1 - May 1996 (1996)(Schatztruhe)[!].iso / Reference / Hardware / AutoConfig next >
Text File  |  1989-05-10  |  11KB  |  269 lines

  1.  
  2. Auto-Configuration
  3.  
  4. The auto-configuration ("autoconfig") protocol is designed to allow the 
  5. dynamic assignment of available address slots to expansion boards, eliminating
  6. the need for user configuration via jumpers.  Upon reset, each board appears
  7. in turn at $E80000, with readable identification information, most of which 
  8. is in one's complement format, stored in the high nibbles of the first $40 
  9. words ($80 bytes) of the board.  This identification information includes 
  10. the size of the board, its address space preferences, type of board (memory 
  11. or other), and a unique Hardware Manufacturer number assigned by Commodore 
  12. Amiga Technical Support.  
  13.  
  14. Each board contains configuration hardware including an address latch 
  15. appearing in the nibble at offset $0048 and the nibble at offset $004a.  
  16. When A23 through A16 of the assigned board base address are written to 
  17. this register, the board latches and appears at the assigned address, 
  18. and passes a signal called config-out which causes the next board to 
  19. appear at $E80000.  To make certain types of boards less expensive, an 
  20. expansion board's write registers may be organized as either a byte-wide 
  21. or nibble-wide register.  If it is nibble-wide then it must latch the 
  22. low nibble of the assigned address (at $4A) until the high nibble (at $48)
  23. is written.  This allows the following algorithm to work with either 
  24. type of board:
  25.  
  26.     Write the low order address nibble to offset $4A
  27.     Write the entire address byte to offset $48
  28.  
  29. Alternately, many boards can be asked to "shut up" (pass config-out
  30. and stop responding) by writing to offset $004c of the board.  A bit
  31. in the nibble at offset $0008 flags whether a board supports shut-up.
  32.  
  33. All commercial expansion slot boards for the Amiga must implement the 
  34. auto-configuration protocol.  More in-depth machine-specific information 
  35. on the design and implementation of autoconfig boards is available from 
  36. Commodore Amiga Technical Support.
  37.  
  38.  
  39. The Amiga operating system contains support for matching up disk-based 
  40. drivers with autoconfig boards. Since 1.3, the OS also supports initialization 
  41. of onboard ROM driver software.  As a general rule, applications should not
  42. attempt to autoconfig expansion peripherals, but rather should allow the
  43. Amiga system software to handle all autoconfiguration.
  44. Many boards contain registers which once activated could do irreparable 
  45. damage to such things as a user's hard disk data if the board was configured 
  46. improperly.
  47.  
  48. However, certain types of low level stand-alone applications may
  49. need to configure hardware such as ram boards without using the
  50. Amiga operating system.  Such applications should only configure expansion
  51. ram boards (boards which ask to be added to the free memory list) and 
  52. known dedicated boards designed for the application.  All other boards
  53. should be "shut up" if the board supports shut-up, or configured and
  54. ignored if shut-up is not supported (There are many boards which do not
  55. support shut-up).   Configuration of boards should only be attempted
  56. by applications which take over the whole machine at reset.  Presence
  57. of an autoconfig board waiting for configuration is determined by
  58. comparing the nibbles appearing at the initial autoconfig address
  59. with the valid values for such nibbles in the specifications.
  60.  
  61. The autoconfig spec requires that boards be configured on boundaries
  62. that match their space requirements.  For example, a one megabyte 
  63. memory board should be configured on a 1 megabyte boundary.  There are 
  64. two exceptions to this rule: boards with a 4 megabyte address space are 
  65. capable of being placed at $200000 and $600000 as well as being placed on 
  66. 4 MByte boundaries; 8 MByte boards can be placed at $200000.  These 
  67. exceptions are necessary because the eight megabyte space reserved for 
  68. expansion in the current machine begins at $200000.
  69.  
  70.  
  71.  
  72. Debugging Autoconfig Boards
  73. ===========================
  74.  
  75. If there is a defect in your configuration information,  your board
  76. may be ignored, shutup, or crash in a way that makes diagnosis
  77. difficult.  A simple trick allows you to test the configuration
  78. information.  Cut the configin* line to your board, and wire
  79. a switch such that you either pass configin* or force the input
  80. high.
  81.  
  82. Set the switch to the high position, and bring up the system.
  83. Your board will be invisible to the system software.  Activate
  84. a debugger, and flip the switch.  Your board should now respond
  85. at the normal $E80000 address.  Your view of the board is identical to
  86. what the Operating System sees when configuring your board.  You
  87. can compare the bits with the expected values.
  88.  
  89.  
  90.  
  91. Address Specification Table
  92. ===========================
  93.  
  94. The following table describes the board identification information and
  95. autoconfig registers which appear in the first $80 bytes of an
  96. autoconfig board at configuration time.
  97.  
  98. Notes:
  99.   
  100. Identification information is stored in the high nibbles of the even (word) 
  101. addresses at the start of an autoconfig board.  For example, the first two
  102. words of a board might contain $Cxxx 1xxx.  The valid information in these
  103. first two words would be the $C (high nibble of the word at offset $00), 
  104. then the $1 (high nibble of the word at offset $02).  Much of the information
  105. is interpreted by combining several nibbles, with low to high address 
  106. nibbles containing high to low order parts of the resulting value.  
  107.  
  108.  
  109. All nibbles of information except for those at offsets $00/02 and $40/42
  110. are stored in an inverted (one's complement) form and must be exclusive 
  111. OR'd with $F before interpreting them according to the table below.
  112. Unused nibbles (the three other nibbles in each word) may not be assumed 
  113. to contain any particular value.  All values written to the autoconfig
  114. area, including the assigned address, are written uninverted.
  115.  
  116. All addresses are shown here as offsets from the base address $E80000
  117. where boards appear at configuration time, so offset $02 is 
  118. at $E80002, offset $04 at $E80004, etc. 
  119.  
  120.  
  121. How to read the Address Specification Table:
  122.  
  123.               
  124. Board Offset   
  125. ($00/02)    7  6  5  4   3  2  1  0      Description of nibbles    
  126. R/W info    \___  ___/   \___  ___/
  127.             \/           \/
  128.      Nibble at $E80000   Nibble at $E80002  
  129.  
  130. Note that the bit numbering ( 7 6 5 4  3 2 1 0 ) is for use when
  131. two nibbles are to be interpreted together as a byte.  Physically,
  132. each nibble is the high nibble of the word at its address (ie. bits
  133. 15 14 13 12).
  134.  
  135.  
  136.               Address Specification Table
  137.  
  138.  OFFSET:    Address 1    Address 2          Description
  139.  ===========================================================================
  140.  
  141. ($00/02)    7  6  5  4   3  2  1  0___ Board size  000=8meg   100=512k
  142.  Read        |  |  |  |   |  \__|__/                001=64k    101=1meg
  143.  Not Inverted    |  |  |  |   |                         010=128k   110=2meg
  144.         |  |  |  |   |                         011=256k   111=4meg
  145.         |  |  |  |   `----------  1 = Next card is also on this board   
  146.         |  |  |  `--------------  1 = Optional ROM vector valid
  147.         |  |  `-----------------  1 = Link into memory free list (RAM)
  148.         |  `--------------\_____  
  149.         `-----------------/       Board type       00 = Reserved
  150.                                        01 = Reserved
  151.                                10 = Reserved
  152.                                11 = Current type
  153.  
  154.  
  155.  
  156. ($04/06)    7  6  5  4   3  2  1  0   Manufacturer chosen product number 
  157.  Read        \___  ___/   \___  ___/
  158.  Inverted        \/           \/
  159.          Hi nibble   Lo nibble
  160.  
  161.  
  162.  
  163. ($08/0A)    7  6  5  4   3  2  1  0   (Remember - these read inverted)
  164.  Read        |  |  |__|___|__|__|__|_  Reserved - Should be 0 currently
  165.  Inverted    |  | 
  166.         |  `--------------------  0 = this board can be "shut up"
  167.         |              1 = this board ignores "shut up"
  168.         |
  169.         `-----------------------  0 = any space OK
  170.                       1 = 8 Meg area preferred
  171.  
  172.  
  173.  
  174. ($0C/0E)    7  6  5  4   3  2  1  0 
  175.  Read        |__|__|__|___|__|__|__|_  Reserved - must be 0
  176.  Inverted
  177.  
  178.  
  179.  
  180. ($10/12)    7  6  5  4   3  2  1  0   High byte of unique hardware
  181.  Read        \___  ___/   \___  ___/   manufacturer number assigned
  182.  Inverted        \/           \/       to manufacturer by CBM USA (CATS).
  183.          Hi nibble   Lo nibble    (Not developer number!)
  184.  
  185. ($14/16)    7  6  5  4   3  2  1  0   Low byte of unique hardware
  186.  Read        \___  ___/   \___  ___/   manufacturer number assigned
  187.  Inverted        \/           \/       to manufacturer by CBM USA (CATS).
  188.          Hi nibble   Lo nibble    (Not developer number!)
  189.  
  190.  
  191. ($18/1A)    7  6  5  4   3  2  1  0   Optional serial #, first byte (msb)
  192. ($1C/1E)    7  6  5  4   3  2  1  0   Optional serial #, second byte
  193. ($20/22)    7  6  5  4   3  2  1  0   Optional serial #, third byte
  194. ($24/26)    7  6  5  4   3  2  1  0   Optional serial #, fourth byte (lsb)
  195.  Read
  196.  Inverted
  197.  
  198. ($28/2A)    7  6  5  4   3  2  1  0   High byte of optional ROM vector.
  199.  Read        \___  ___/   \___  ___/   
  200.  Inverted        \/           \/       
  201.          Hi nibble   Lo nibble    
  202.                       
  203.  
  204. ($2C/2E)    7  6  5  4   3  2  1  0   Low byte of optional ROM vector.
  205.  Read        \___  ___/   \___  ___/   If the "ROM vector valid" bit
  206.  Inverted        \/           \/       is set in nibble $00 at the start
  207.          Hi nibble   Lo nibble    of the board, then this optional
  208.                       ROM vector is the offset from the
  209.                       board base to ROM driver structures.
  210.  
  211.  
  212. ($30/32)      7  6  5  4   3  2  1  0      Read - Reserved, must be 00
  213.  R/W                        Write - optional reset of
  214.  Inverted                           board base register to
  215.                                pre-configuration address
  216.  
  217.  
  218. ($34/36)    7  6  5  4   3  2  1  0   Reserved, must be 00
  219. ($38/3A)    7  6  5  4   3  2  1  0   Reserved, must be 00
  220. ($3C/3E)    7  6  5  4   3  2  1  0   Reserved, must be 00
  221.  Inverted
  222.  
  223. ($40/42)    7  6  5  4   3  2  1  0      Write         Read
  224.  R/W        |  |  |  |   |  |  |  |
  225. Not Inverted      |  |  |  |   |  |  |  `-  Interrupt enable   Interrupt enable
  226.           |  |  |  |   |  |  `----  User definable     Undefined
  227.           |  |  |  |   |  `-------  Local reset         Must be 0
  228.           |  |  |  |   `----------  User definable     Undefined
  229.         |  |  |  `--------------  User definable     INT2 pending  
  230.           |  |  `-----------------  User definable     INT6 pending
  231.           |  `--------------------  User definable     INT7 pending
  232.           `-----------------------  User definable     Board pulling INT
  233.  
  234.    Note:  Use of the $40/42 registers is an optional feature which
  235.           can be implemented by boards which generate interrupts.
  236.           They make it possible for board-specific interrupt servers  
  237.           to determine if the current interrupt is being generated
  238.           by their board, or by some other hardware using the
  239.           same interrupt line.
  240.  
  241. ($44/46)    7  6  5  4   3  2  1  0   Reserved, read must be 00
  242.  R/W                      Write undefined
  243.  Inverted
  244.  
  245.  
  246. ($48/4A)    7  6  5  4   3  2  1  0   Base address register, write only.
  247. Write Only    \___  ___/   \___  ___/   These bits are compared with A23
  248. Not Inverted        \/           \/       through A16 (or fewer) to determine
  249.          Hi nibble   Lo nibble    the base address of the board.
  250.  
  251.  
  252. ($4C/4E)    7  6  5  4   3  2  1  0   Optional "shut up" register.
  253. Write Only     \___  ___/          Any write to $4C will cause
  254.             \/              board to pass config out and
  255.              `------------------  and then never respond again 
  256.                       to any address, until RESET.
  257.                       A bit in nibble $08 flags
  258.                       whether the board can be shut up.
  259.  
  260.  
  261. ($50 through $7E)              Reserved, must be 00
  262.  Inverted
  263.  
  264.  
  265. Remember that all nibbles except $00/02 and $40/42 will actually
  266. appear inverted from the values in the above table.  For example,
  267. a "must be 0" nibble will appear as $F, and flags and hex values
  268. will also be inverted (ie a value of $1 will read as $E, etc). 
  269.